package com.atguigu.springbootcrud.Controll;

import com.atguigu.springbootcrud.biz.crudBiz;
import com.atguigu.springbootcrud.vo.tjQuery;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lhl
 * @create 2019-12-27 23:22
 */
@RestController
@RequestMapping("/one")
public class CrudAll {

    @Autowired
    private crudBiz biz;

    @GetMapping("findEmpAll/{num}/{size}")
    public PageInfo<tjQuery> QueryAll(@PathVariable int num,@PathVariable int size){
        System.out.println("进入findEmpAll  参数Num："+num+"=======参数Size："+size);
        PageHelper.startPage(num, size);
        return new PageInfo<tjQuery>(biz.findAll());
    }
}
